#ifndef PLANNER_H
#define PLANNER_H

#include <QPointF>
#include <QVector>
#include <QPolygonF>
#include "basic_typedef.h"
#include "Scene.h"
#include "Graph.h"
#include <CGAL/Random.h>
#include <boost/shared_ptr.hpp>
#include "Sampler.h"
#include "CollisionDetector.h"

class Planner
{
public:
	
	////////////////////////
	// C'tors & D'tors
	////////////////////////

	Planner(Scene* scene);

	~Planner(void);

	////////////////////////
	// modifiers
	////////////////////////

	void run();

	////////////////////////
	// helpers
	////////////////////////

private:
	Point_2		transformToCGAL(QPointF qp);

	QPointF		transformToQT(Conf cp);

	QVector<QPointF> transformToQT(ConfSet cs);

	QVector<QVector<QPointF> > transformToQT(list<vector<Conf> > path);

	void		transform_path_for_gui();

	void	extract_scenario_from_gui();

	///////////////////////
	// Data members
	///////////////////////

	Scene*				m_scene;
	vector<Polygon_2>	m_robot_polygons;
	Obstacles			m_obstacles;	// polygonal obstacles + scenario boundaries
	ConfSet				m_start_confs, m_target_confs;
	Room				m_room;
	int					m_robot_num;
	vector<ConfSet>		m_path;			// path section - robot - configuration
};


#endif